﻿<%@ Page Language="C#" MasterPageFile="~/Member/UserManage.master" EnableEventValidation="false"
    AutoEventWireup="true" CodeFile="SendMessage.aspx.cs" Inherits="member_Message_SendMessage"
    Title="我发出的留言" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContInfo" runat="server">
  <script type="text/ecmascript">
        function SelectAll()
        {
            // 找到所有的 input 元素
            var ctllist = document.getElementsByTagName("input");
            var objcheckbox= document.getElementById("CheckBox2");     
            for( var i = 0; i< ctllist.length; i++)
            {
                if(ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0 )
                {   
                    if(objcheckbox.checked==true)     
                         ctllist[i].checked = true;
                    else
                         ctllist[i].checked = false;
                }
          
             }
         }
    </script>
    <div class="inkg mar_top">
    <form id="form1">
            <strong class="inkgt">
                我发出的留言</strong>
        <div class="intip mar_top">
                <strong class="intipt">提&nbsp;示：</strong>·留言的有效期为1年，系统将自动删除超出有效期的留言。请注意保存重要留言！
            </div>
            <div class="inso mar_top">  
            <table border="0" cellpadding="0" cellspacing="0" width="440">
                <tr>
                    <td>
                        <asp:TextBox ID="txtMessage" runat="server" ToolTip="请输入留言" Width="123" Height="17"></asp:TextBox>
                        <asp:DropDownList ID="dropMessageState" runat="server">
                            <asp:ListItem Selected="True" Value="">留言状态</asp:ListItem>
                            <asp:ListItem Value="0">对方未读</asp:ListItem>
                            <asp:ListItem Value="1">对方已读</asp:ListItem>
                            <asp:ListItem Value="2">对方已回复</asp:ListItem>
                        </asp:DropDownList>
                        <asp:DropDownList ID="dropMessageDate" runat="server">
                            <asp:ListItem Value="七天内的留言">七天内的留言</asp:ListItem>
                            <asp:ListItem Value="一个月内的留言">一个月内的留言</asp:ListItem>
                            <asp:ListItem Selected="True" Value="三个月内的留言">三个月内的留言</asp:ListItem>
                            <asp:ListItem Value="三个月以上留言">三个月以上留言</asp:ListItem>
                        </asp:DropDownList>
                        <asp:Button ID="btnSelect" runat="server" OnClick="btnSelect_Click" Text="立即查询" CssClass="del" /></td>
                </tr>
            </table> 
            </div>
            <div class="main_Supply_nav">
                <ul>
                    <li class="intabt2">所有留言</li>
                </ul>
            </div>
        <div class="intabc" id="intabc">
            <div class="con" style="display: block">
              <table cellpadding="0" cellspacing="0" border="0" class="edtb">
                            <thead>
                                <tr>
                                    <td id="xh" align="center" width="40">
                                        <strong>选项</strong>
                                    </td>
                                    <td align="center" width="100">
                                        <strong>状态</strong>
                                    </td>
                                    <td align="center" width="250">
                                        <strong>留言标题</strong>
                                    </td>
                                    <td align="center" width="100">
                                        <strong>发给</strong>
                                    </td>
                                    <td align="center">
                                        <strong>留言日期</strong>
                                    </td>
                                </tr>
                            </thead>
                            <tbody>
               <asp:Repeater  ID="grdMessage" runat="server"  > 
                    <ItemTemplate>
                        <tr>
                            <td width="40" align="center">
                                <input runat="server" value='<%# DataBinder.Eval(Container.DataItem,"ID")%>' id="chk" name="chk"
                                    type="checkbox" onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" />
                            </td>
                            <td width="100" align="center">
                                <%#  GetCharacter(Eval("Restore").ToString())%>
                            </td>
                            <td width="250" align="center">
                                <a href='MessageAdd.aspx?uid=<%# DataBinder.Eval(Container.DataItem,"SendUserID") %>&ID=<%#Eval("ID")%>'>
                                            <%# DataBinder.Eval(Container.DataItem,"Title") %>
                                        </a>
                            </td>
                            <td align="center" width="100">
                                <%# GetNewTitle(DataBinder.Eval(Container.DataItem, "LoginName").ToString())%>
                            </td>
                            <td align="center" style="">
                               <%# GetShortDate(DataBinder.Eval(Container.DataItem, "Date").ToString())%>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater >
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="5">
                                    <p class="zi1">
                                                     <input runat="server" class="checkbox" type="checkbox" id="chkall" name="chkall" onclick="CheckMinoAll();" />
                                        全选
                                        <asp:Button ID="btnDelete" runat="server" Font-Size="9pt" OnClick="btnDelete_Click"
                                            OnClientClick="return CheckSelect();return confirm('你确认要删除吗?');" Text="批量删除" CssClass="del"  />
                                    </p>
                                    <p class="zi2">
                        总记录数：<asp:Label ID="txt_pageCount" runat="server"></asp:Label>
                        页码：<asp:Label ID="txt_begin" runat="server"></asp:Label>/<asp:Label ID="txt_pageAll"
                            runat="server"></asp:Label>
                        <asp:LinkButton ID="txt_pageFirst" runat="server" OnClick="txt_pageFirst_Click">首页</asp:LinkButton>
                        <asp:LinkButton ID="txt_pageLast" runat="server" OnClick="txt_pageLast_Click">上一页</asp:LinkButton>
                        <asp:LinkButton ID="txt_pageNext" runat="server" OnClick="txt_pageNext_Click">下一页</asp:LinkButton>
                        <asp:LinkButton ID="txt_pageFoot" runat="server" OnClick="txt_pageFoot_Click">末页</asp:LinkButton>
                        <asp:TextBox ID="txt_PageNum" runat="server" Width="30px"></asp:TextBox>
                        <asp:LinkButton ID="Lk_go" runat="server" OnClick="Lk_go_Click">GO</asp:LinkButton>
                                    </p>
                                </td>
                            </tr>
                        </tfoot>
                        </table>
                        <input type="hidden" id="CheckedIDS" name="CheckedIDS" value="0" runat="server" />
        </div></div>
    </form>
        </div>
</asp:Content>
